package edu.whu.demo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 
 * @since 2022-12-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Message implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "to_uid")
    private Long toUid;

    // 评论用户id 或者 reminder的id 或者schedule的id
    @TableField(value = "from_uid")
    private Long fromUid;

    @TableField(value = "activity_id")
    private Long activityId;

    private String content;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;

    //评论审核还未做
    // 活动提醒reminder、活动变动change、评论comment、管理员审核活动check、日程schedule
    private String type;

    @TableField(value = "is_read")
    private Integer isRead;


}
